package com.itheima.sc.web.ums;

import com.itheima.sc.pojo.ums.UmsMemberLevel;
import com.itheima.sc.result.Result;
import com.itheima.sc.service.ums.UmsMemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("memberLevel")
public class UmsMemberLevelController {
    @Autowired
    private UmsMemberLevelService umsMemberLevelService;

    /**
     * 查询所有会员等级
     */
    @GetMapping("list")
    public Result list(){
        List<UmsMemberLevel> list = umsMemberLevelService.list();
        return Result.success(list);
    }
}

